package com.cictec.middleware.api.tde;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.cictec.middleware.commons.utils.Result;

/**
 * 客户端指令下发管理类，主要是区分消息发送给哪种协议的客户端，该实现方式后续调整
 * 
 * @author Administrator
 *
 */
public interface SendPlatformMessageToTerminalService {

	/**
	 * 文字消息下发
	 * 
	 * @param devCode
	 * @param lineId
	 * @param content
	 * @return
	 */
	@RequestMapping(value = "/positionUpload")
	public Result sendTextMessage(@RequestParam("devCode") String devCode, @RequestParam("lineId") String lineId,
			@RequestParam("content") String content);

	/**
	 * 文字语音消息下发
	 * 
	 * @param devCode
	 * @param lineId
	 * @param content
	 * @return
	 */
	@RequestMapping(value = "/positionUpload")
	public Result sendTextVoiceMessage(@RequestParam("devCode") String devCode, @RequestParam("lineId") String lineId,
			@RequestParam("content") String content);

	/**
	 * 下发发车时刻
	 * 
	 * @param devCode
	 *            设备编号
	 * @param lineId
	 *            线路编号（可为null）
	 * @param content
	 *            时刻（HH:mm）
	 * @return
	 */
	@RequestMapping(value = "/positionUpload")
	public Result sendDepartureTimeMessage(@RequestParam("devCode") String devCode,
			@RequestParam("lineId") String lineId, @RequestParam("content") String content);

	/**
	 * 前后车距消息下发
	 * 
	 * @param devCode
	 * @param lineId
	 * @param content
	 * @return
	 */
	@RequestMapping(value = "/positionUpload")
	public Result sendBeforAfterDistanceMessage(@RequestParam("devCode") String devCode,
			@RequestParam("lineId") String lineId, @RequestParam("content") String content);

	/**
	 * 切换线路消息下发
	 * 
	 * @param devCode
	 * @param newLineId
	 * @param direction
	 * @return
	 */
	@RequestMapping(value = "/positionUpload")
	public Result sendChangeLineMessage(@RequestParam("devCode") String devCode,
			@RequestParam("newLineId") String newLineId, @RequestParam("direction") String direction);

	/**
	 * 切换运营状态消息下发
	 * 
	 * @param devCode
	 * @param typeValue
	 *            运营状态类型
	 * @param departureTime
	 *            如果车辆非营运状态，则为 0；1运营
	 * @param content
	 * @return
	 */
	@RequestMapping(value = "/positionUpload")
	public Result sendChangeOperateMessage(@RequestParam("devCode") String devCode,
			@RequestParam("typeValue") String typeValue, @RequestParam("departureTime") int departureTime);

	/**
	 * 下发报站文件升级指令
	 * 
	 * @param devCode
	 * @param data
	 *            object 根据情况取取（默认JSONObject）目前使用json传递参数
	 * @return
	 */
	@RequestMapping(value = "/positionUpload")
	public Result sendUploadReportStationFileMessage(@RequestParam("devCode") String devCode,
			@RequestParam("object") Object object);

}
